<?php

class Groups_Form_Group extends Zend_Form {

    public function init() {


        $this->setName('form_group');
        $this->setMethod('post');


        $nombre = new Zend_Form_Element_Text('name');
        $nombre->setLabel('Nombre')
                ->setRequired(true)
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addFilter('StringToLower')
                ->addValidator('NotEmpty', true, array('messages' => 'Ingrese su nombre'));




        // username
        $username = new Zend_Form_Element_Textarea('description');
        $username->setLabel('Descripcion')
                ->setRequired(true)
                ->setAttrib('rows', '12')
                ->setAttrib('cols', '40')
                ->addFilter('StripTags')
                ->addFilter('StringTrim')
                ->addFilter('StringToLower')
                ->addValidator('NotEmpty', true, array('messages' => 'Ingrese una descripcion'));


        // submit
        $submit = new Zend_Form_Element_Submit('submit');


        // add elements
        $this->addElements(array($nombre, $username,  $submit));
    }

}